package com.java.base.exercise.designmode.builder;

/**
 * @Author RenPu
 * @Date 2021/6/30 11:17
 * @Version 1.0
 * @Description: 设计模式---构建者模式
 **/


/**
 * 地形实体类
 */

public class Terrain {

    //墙实体类
    Wall wall;
    //地雷实体类
    Mine mine;
    //暗堡实体类
    Bunker bunker;

    @Override
    public String toString() {
        return "Terrain{" +
                "wall=" + wall +
                ", mine=" + mine +
                ", bunker=" + bunker +
                '}';
    }
}


/**
 * 墙实体类
 */
class Wall {

    int x, y, z, w;

    public Wall(int x, int y, int z, int w) {
        this.x = x;
        this.y = y;
        this.z = z;
        this.w = w;
    }

    @Override
    public String toString() {
        return "Wall{" +
                "x=" + x +
                ", y=" + y +
                ", z=" + z +
                ", w=" + w +
                '}';
    }
}


/**
 * 地雷实体类
 */
class Mine {

    int x, y, z, w;

    public Mine(int x, int y, int z, int w) {
        this.x = x;
        this.y = y;
        this.z = z;
        this.w = w;
    }


    @Override
    public String toString() {
        return "Mine{" +
                "x=" + x +
                ", y=" + y +
                ", z=" + z +
                ", w=" + w +
                '}';
    }
}


/**
 * 暗堡实体类
 */
class Bunker {
    int x, y, z, w;

    public Bunker(int x, int y, int z, int w) {
        this.x = x;
        this.y = y;
        this.z = z;
        this.w = w;
    }


    @Override
    public String toString() {
        return "Bunker{" +
                "x=" + x +
                ", y=" + y +
                ", z=" + z +
                ", w=" + w +
                '}';
    }
}
